namespace SeaVM
{
    public class Number
    {
        public double value;

        public static Data Add(Number a,Number b)
        {
            return new Data(a.value + b.value);
        }

        public static Data Add(Number a,String b)
        {
            return new Data(a.value + b.value);
        }

        public static Data Add(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Add运算");
        }

        public static Data Add(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Add运算");
        }

        public static Data Sub(Number a,Number b)
        {
            return new Data(a.value - b.value);
        }

        public static Data Sub(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Sub运算");
        }

        public static Data Sub(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Sub运算");
        }

        public static Data Sub(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Sub运算");
        }

        public static Data Mul(Number a,Number b)
        {
            return new Data(a.value * b.value);
        }

        public static Data Mul(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Mul运算");
        }

        public static Data Mul(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Mul运算");
        }

        public static Data Mul(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Mul运算");
        }

        public static Data Div(Number a,Number b)
        {
            return new Data(a.value / b.value);
        }

        public static Data Div(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Div运算");
        }

        public static Data Div(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行div运算");
        }

        public static Data Div(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Div运算");
        }

        public static Data Mod(Number a,Number b)
        {
            return new Data((double)((int)a.value % (int)b.value));
        }

        public static Data Mod(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Mod运算");
        }

        public static Data Mod(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Mod运算");
        }

        public static Data Mod(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Mid运算");
        }

        public static Data Gr(Number a,Number b)
        {
            return new Data(a.value > b.value);
        }

        public static Data Gr(Number a,String b)
        {
           throw new VmTypeError("Number类型不能和String类型进行Gr运算");
        }

        public static Data Gr(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Gr运算");
        }

        public static Data Gr(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Gr运算");
        }

        public static Data Le(Number a,Number b)
        {
            return new Data(a.value < b.value);
        }

        public static Data Le(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Le运算");
        }

        public static Data Le(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Le运算");
        }

        public static Data Eq(Number a,Number b)
        {
            return new Data(a.value == b.value);
        }

        public static Data Eq(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Eq运算");
        }

        public static Data Eq(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Eq运算");
        }

        public static Data Eq(Number a,Nil b)
        {
            throw new VmTypeError("Number类型不能和Nil类型进行Eq运算");
        }

        public static Data Neq(Number a,Number b)
        {
            return new Data(a.value != b.value);
        }

        public static Data Neq(Number a,String b)
        {
            throw new VmTypeError("Number类型不能和String类型进行Neq运算");
        }

        public static Data Neq(Number a,Boolean b)
        {
            throw new VmTypeError("Number类型不能和Boolean类型进行Neq运算");
        }

        public static Data Neq(Number a,Nil b)
        {
            return new Data(false);
        }
    }
}